<?php

class upload_batch extends entity
{
    public $structs = [
        'number' => '',
        'format_time' => '',
    ];

    public static $entity_display_name = '上传批次';
    public static $entity_description = '上传批次';

    public function __construct()
    {/*{{{*/
        $this->has_many('raw_addresses', 'raw_address');
    }/*}}}*/

    public static function create()
    {/*{{{*/
        return parent::init();
    }/*}}}*/

    public function delete_relation_entities()
    {/*{{{*/
        foreach ($this->raw_addresses as $raw_address) {

            $raw_address->delete();
        }
    }/*}}}*/
}
